<?php
/*
 * @name 文章公共数据处理处理类
 * @author Jin
 * @date 2017.12.28
 **/
namespace app\common\model;

use think\Model;

class Article extends Model
{
	protected $pk = 'art_id';
	//自动转换时间戳
    protected $type = [
        'art_addtime' => 'timestamp:Y-m-d H:i:s',
    ];

    public function cat(){
        return $this->belongsTo('ArticleCat','art_cat_id','cat_id');
    }
}